﻿using Framework.Components;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using tproto.Maker;
using Tproto.Maker;

namespace tproto
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args == null || args.Length <= 0)
            {
                //args = new string[] {"-in=../../in/activity/ActivityMsg.rp", "-out=./out", "-filetype=xlsx", "-filename=%sTempId.java", "-type=data",
                //    "-language=common", "-vm=vms/TempId.java.vm", "-args=[package=com.tgt.uu.constant, utils_package=com.test]", "-filtrates=RandomName" };
                //args = new string[] {"-in=../../in/activity/rp.ActivityMsg", "-out=./out", "-filetype=xlsx", "-outfilename={1}/{0}.java", "-type=data",
                //   "-language=common", "-vm=../../vm/JavaTemp.vm", "-vmargs=[package=com.tgt.uu.constant, utils_package=com.test]", "-filtrates=RandomName" };

                const string path = "G:\\temp\\gsync\\tf";

                args = new string[] {"-in="+path+"\\server\\tools\\run\\proto_tool\\proto", "-out="+path+"\\server\\trunk\\workspace\\GameProto\\src\\com\\tgt\\tf\\rp", "-filetype=xlsx", "-outfilename={1}/{0}.java", "-type=data",
                    "-language=common", "-vm=../../vm/JavaTemp.vm", "-vmargs=[package=com.tgt.tf.rp, utils_package=com.test]", "-filtrates=RandomName", "-openfolder=true" };
                //args = new string[] {"-in=E:\\prj\\uugame\\server\\tools\\run\\proto_tool\\proto", "-out=E:\\prj\\uugame\\client\\chunk\\Assets\\Protocol", "-filetype=xlsx", "-outfilename={1}/{0}.json", "-type=data",
                //   "-language=common", "-vm=../../vm/JsonTemp.vm", "-vmargs=[package=com.tgt.uu.rp]", "-filtrates=RandomName" };

            }

            var makder = new TprotoMaker();
            makder.Start(args);
        }
    }
}
